define(function(require, exports, module){
	
	/**
     * @name FormatXML#formatXML
     * @function   
     * @desc 格式化xml文件为html。
     * @param {Object} xml
     */
	var $formate = require('./formatxml'),
		requestUrl = {
			getArea: '/trp/strategy/get_areas_tree/',
			getWord: '/trp/strategy/get_hotwords_tree/',
			submit: 'http://10.100.4.91:6400/algorithm'
		}
	
	var validAlgorithm = function(option){
		var op = $.extend({
				xml: '',
				java: '',
				success: null,
				error: null
			}, option), 
			areaArr = { submitNode:[], nodes:[], parents:[], data:[]}, 
			wordArr = { submitNode:[], nodes:[], parents:[], data:[]};
		
		$ajax.ajax({
    		url: '/static/trp/template/validalgorithm.html',
    		success: function(html){
    			$dialog({
    				title: '算法检验',
    				width: 800,
    				zIndex: semi.utils.topIndex(),
    				onshow: function(){
    					var $dlg = this, 
    						$node = $(this.node);
    					
    					$dlg.content(html);
    					if(semi.utils.isEmpty(op.xml)){
    						$('.forui',$node).remove();
    					}else{
    						$('.uicontent',$node).html($formate.gethtml(op.xml));
    					}
    					$formate.inithtml();
    					
    					
    					//地域定向	areaArr = {submitNode:[], nodes:[], parents:[], data:[]}
                		$('.getareadata',$node).on('click', function(){
                			var treeDlgOpened = false;
                			var $areaDlg = $dialog({
                				id: 'getareadataDlg',
                				title: '地域定向',
                				width: '400px',
                				zIndex: semi.utils.topIndex(),
                				onshow: function(){
                					var _$d = this, _$node = $(this.node);
                					var _initTree = function(){
                						require.async('ztree', function(){
                							var _treeData = semi.utils.clone(areaArr.data);
                							// 初始化选中
                							$.each(areaArr.submitNode, function(i,n){
                								var _index = -1;
                								$.each(_treeData, function(j,m){
            										if(n.id==m.id)_index = j;
            									});
                								if(_index==-1)return;
                								$.each(_treeData, function(j,m){
                									if(m.pId==n.id){
                										$.each(_treeData, function(k,o){
                											if(o.pId==m.id){
                												$.extend(o,{
                													checked: true
                												});
                											}
                										});
                										$.extend(m,{
                											checked: true
                										});
                									}
                								});
                								$.extend(_treeData[_index],{
                									checked: true
                								});
                                    		});
                							// 初始化展开
                							$.each(_treeData, function(i,n){
            									var len = 0; sub = 0;
            									$.each(_treeData, function(j,m){
            										if(m.pId==n.id){
            											if(m.checked){
            												sub++;
            											}
            											len++;
            										}
            									});
            									if(sub!=0){
            										$.extend(n,{
            											open: true,
            										});
            									}
            									if(len==sub){
            										$.extend(n,{
            											open: false,
            										});
            									}
                							});
                							//展开[中国]
                							$.extend(_treeData[0],{
                								open: true
                							});
                							
                							_$d.content('<div style="width:400px;height:300px;overflow:auto;"><input type="text" class="form-control ipt_search" placeholder="模糊搜索" style="position:absolute;top:-60px;left:140px;"/><ul id="areaTree" class="ztree"></ul></div>');
            								$.fn.zTree.init($('#areaTree'), {
            									data: {
        											simpleData: {
        												enable: true
        											}
        										},
                    							view: {
                    								fontCss: function(treeId, treeNode) {
                    									return (!!treeNode.highlight) ? {color:"#A60000", "font-weight":"bold"} : {color:"#333", "font-weight":"normal"};
                    								}
                    							},
                    							check: {
                    								enable: true,
                    								autoCheckTrigger: true,
                    								chkStyle: "radio",
                    								radioType: "all"
                    							}
                    						}, _treeData);
            								
            								/* 模糊搜索 */
                    						var treeObj = $.fn.zTree.getZTreeObj('areaTree'),
                    							lastValue = '',
                    							nodeList = [],
                    							updateNodes = function(highlight) {
                        							for( var i=0, l=nodeList.length; i<l; i++) {
                        								nodeList[i].highlight = highlight;
                        								treeObj.updateNode(nodeList[i]);
                        								treeObj.expandNode(nodeList[i].getParentNode(), true, false, false);
                        							}
                        						};
                    						
                    						$('.ipt_search',_$node).on({
                    							keyup: function(){
                        							var value = $(this).val().trim(),
                        								keyType = 'name';
                        							
                    								if(lastValue === value) return;
                    								lastValue = value;
                    								updateNodes(false);
                    								if(semi.utils.isEmpty(value)) return;
                    								nodeList = treeObj.getNodesByParamFuzzy(keyType, value);
                        							updateNodes(true);
                        						}
                    						});
        								});
                					}
                					if(semi.utils.isEmpty(areaArr.data)){
                						$ajax.ajax({
                							url: requestUrl.getArea,
                							success: function(treedata){
                								areaArr.data = treedata.data;
                								areaArr.data[0].pId = null;
                								_initTree();
                							}
                    					});
                					}else{
                						_initTree();
                					}
                				},
                				okValue: '确定',
                				ok: function(){
                            		var treeObj = $.fn.zTree.getZTreeObj('areaTree'),
    									checkedNodes = treeObj.getCheckedNodes();
                            		
                            		areaArr.submitNode = [], areaArr.nodes = [], areaArr.parents = [];
                            		$.each(checkedNodes, function(i,treeNode){
                            			var pNode = treeNode.getParentNode() , 
                            				node = {id:treeNode.id, name:treeNode.name, pId:treeNode.pId, parent:-1, areacode:treeNode.areacode};
                        				if(!semi.utils.isEmpty(pNode)){
                        					node.parent = pNode.id;
                        					areaArr.parents.pushOnly(pNode);
                        				}
                        				areaArr.nodes.pushOnly(node);
                        				areaArr.submitNode.pushOnly({id:treeNode.id, name:treeNode.name, areacode:treeNode.areacode});
                            		});
                            		if(semi.utils.isEmpty(areaArr.nodes))areaArr.parents = [];
                            		$.each(areaArr.parents, function(i,n){
                            			var length = 0;
                            			$.each(areaArr.nodes, function(j,m){
                                			if(m.parent==n.id)length++;
                                		});
                            			if(length==n.children.length){
                            				var allchecked = true;
                            				$.each(n.children, function(j,m){
                            					if(!semi.utils.isEmpty(m.children)){
                                        			$.each(m.children, function(k,o){
                                            			if(!o.checked)allchecked = false;
                                            		});
                                    			}
                            				});
                            				if(allchecked){
                            					$.each(areaArr.nodes, function(j,m){
                                        			if(m.parent==n.id){
                                        				areaArr.submitNode.remove({id:m.id, name:m.name, areacode:m.areacode});
                                        			}
                                        		});
                            				}else{
                            					areaArr.submitNode.remove({id:n.id, name:n.name, areacode:n.areacode});
                            				}
                            			}else{
                            				areaArr.submitNode.remove({id:n.id, name: n.name, areacode:n.areacode});
                            			}
                            		});
                            		
                            		var _nameArr = [];
                            		$.each(areaArr.submitNode, function(i,n){
                            			_nameArr.push(n.name);
                            		});
                            		$('.getareadata',$node).val(_nameArr.join('，'));
                                },
                                cancelValue: '取消',
                                cancel: true
                			}).showModal();
                		});
                		
                		//关键字定向	wordArr = {submitNode:[], nodes:[], parents:[], data:[]}
                		$('.getworddata',$node).on('click', function(){
                			var treeDlgOpened = false;
                			var $wordDlg = $dialog({
                				id: 'getworddataDlg',
                				title: '关键字定向',
                				width: '400px',
                				zIndex: semi.utils.topIndex(),
                				onshow: function(){
                					var _$d = this, _$node = $(this.node);
                					var _initTree = function(){
                						require.async('ztree', function(){
                							var _treeData = semi.utils.clone(wordArr.data);
                							// 初始化选中
                							$.each(wordArr.submitNode, function(i,n){
                								var _index = -1;
                								$.each(_treeData, function(j,m){
            										if(n.id==m.id)_index = j;
            									});
                								if(_index==-1)return;
                								$.each(_treeData, function(j,m){
                									if(m.id==n.pId){
                										$.extend(m,{
                											checked: true
                										});
                										$.each(_treeData, function(k,o){
                											if(o.id==m.pId){
                												$.extend(o,{
                													checked: true
                												});
                											}
                										});
                									}
                								});
                								$.extend(_treeData[_index],{
                									checked: true
                								});
                                    		});
                							// 初始化展开
                							/*$.each(_treeData, function(i,n){
            									var len = 0; sub = 0;
            									$.each(_treeData, function(j,m){
            										if(m.pId==n.id){
            											if(m.checked){
            												sub++;
            											}
            											len++;
            										}
            									});
            									if(sub!=0){
            										$.extend(n,{
            											open: true,
            										});
            									}
            									if(len==sub){
            										$.extend(n,{
            											open: false,
            										});
            									}
                							});*/
                							//展开
                							/*$.extend(_treeData[0],{
                								open: true
                							});*/
                							//关键字活跃度显示
                							$.each(_treeData, function(i,n){
                								if(!semi.utils.isEmpty(n.active) && n.active==1){
                									n['font'] = {'color':'red'};
                								}
                							});
                							if(semi.utils.isEmpty(_treeData)){
            									_$d.content('<span class="alert-warning"></span><span>暂无关键字！</span>');
            									_$d.button([{
            										value: '关闭'
            									}]);
            									return;
            								}
                							_$d.content('<div style="width:400px;height:300px;overflow:auto;"><input type="text" class="form-control ipt_search" placeholder="模糊搜索" style="position:absolute;top:-60px;left:140px;"/><ul id="wordTree" class="ztree"></ul></div>');
                							$.fn.zTree.init($('#wordTree'), {
            									data: {
        											simpleData: {
        												enable: true
        											}
        										},
                    							view: {
                    								fontCss: function(treeId, treeNode) {
                    									return (!!treeNode.highlight) ? {color:"#A60000", "font-weight":"bold"} : (treeNode.font ? $.extend({"font-weight":"normal"},treeNode.font) : {color:"#333", "font-weight":"normal"});
                    								}
                    							},
                    							check: {
                    								enable: true,
                    								autoCheckTrigger: true,
                    								chkStyle: "radio",
                    								radioType: "all",
                    								chkboxType: { "Y" : "p", "N" : "p" }
                    							}
                    						}, _treeData);
            								
            								/* 模糊搜索 */
                    						var treeObj = $.fn.zTree.getZTreeObj('wordTree'),
                    							lastValue = '',
                    							nodeList = [],
                    							updateNodes = function(highlight) {
                        							for( var i=0, l=nodeList.length; i<l; i++) {
                        								nodeList[i].highlight = highlight;
                        								treeObj.updateNode(nodeList[i]);
                        								treeObj.expandNode(nodeList[i].getParentNode(), true, false, false);
                        							}
                        						};
                    						
                    						$('.ipt_search',_$node).on({
                    							keyup: function(){
                        							var value = $(this).val().trim(),
                        								keyType = 'name';
                        							
                    								if(lastValue === value) return;
                    								lastValue = value;
                    								updateNodes(false);
                    								if(semi.utils.isEmpty(value)) return;
                    								nodeList = treeObj.getNodesByParamFuzzy(keyType, value);
                        							updateNodes(true);
                        						}
                    						});
        								});
                					}
                					if(semi.utils.isEmpty(wordArr.data)){
                						$ajax.ajax({
                							url: requestUrl.getWord,
                							success: function(treedata){
                								wordArr.data = treedata.data;
                								//wordArr.data[0].pId = null;
                								_initTree();
                							}
                    					});
                					}else{
                						_initTree();
                					}
                				},
                				okValue: '确定',
                				ok: function(){
                            		var treeObj = $.fn.zTree.getZTreeObj('wordTree'),
    									checkedNodes = treeObj.getCheckedNodes();
                            		
                            		wordArr.submitNode = [], wordArr.nodes = [], wordArr.parents = [];
                            		$.each(checkedNodes, function(i,treeNode){
                            			var pNode = treeNode.getParentNode() , 
                            				node = {id:treeNode.id, name:treeNode.name, pId:treeNode.pId, parent:-1};
                        				if(!semi.utils.isEmpty(pNode)){
                        					node.parent = pNode.id;
                        					wordArr.parents.pushOnly(pNode);
                        				}
                        				wordArr.nodes.pushOnly(node);
                        				wordArr.submitNode.pushOnly({id:treeNode.id, name:treeNode.name, pId:treeNode.pId});
                            		});
                            		if(semi.utils.isEmpty(wordArr.nodes))wordArr.parents = [];
                            		$.each(wordArr.parents, function(i,n){
                            			var length = 0;
                            			$.each(wordArr.nodes, function(j,m){
                                			if(m.parent==n.id)length++;
                                		});
                            			if(length>0)wordArr.submitNode.remove({id:n.id, name: n.name, pId:n.pId});
                            			/*if(length==n.children.length){
                            				var allchecked = true;
                            				$.each(n.children, function(j,m){
                            					if(!semi.utils.isEmpty(m.children)){
                                        			$.each(m.children, function(k,o){
                                            			if(!o.checked)allchecked = false;
                                            		});
                                    			}
                            				});
                            				if(allchecked){
                            					$.each(wordArr.nodes, function(j,m){
                                        			if(m.parent==n.id){
                                        				wordArr.submitNode.remove({id:m.id, name:m.name, pId:m.pId});
                                        			}
                                        		});
                            				}else{
                            					wordArr.submitNode.remove({id:n.id, name:n.name, pId:n.pId});
                            				}
                            			}else{
                            				wordArr.submitNode.remove({id:n.id, name: n.name, pId:n.pId});
                            			}*/
                            		});
                            		
                            		//关键字回显
                            		var _nameArr = [], _ares = [], _words = [];
                            		$.each(wordArr.submitNode, function(i,n){
                            			_ares.push(n.id);
                					});
                            		$.each(wordArr.submitNode, function(i,n){
                            			var namepath = [n.name];
                            			$.each(wordArr.data, function(j,m){
                            				if(m.id==n.pId){
                            					namepath.push(m.name);
                            					$.each(wordArr.data, function(k,o){
                                    				if(o.id==m.pId){
                                    					namepath.push(o.name);
                                    				}
                                    			});
                            				}
                            			});
                            			_nameArr.push(namepath.reverse().join('-'));
                					});
                            		$('.getworddata',$node).val(_nameArr.join(','));
                                },
                                cancelValue: '取消',
                                cancel: true,
                                statusbar: '<span class="font12">注：红色为活跃关键字</span>'
                			}).showModal();
                		});
                		
    					$node.initUI();
    				},
    				okValue: '测试',
    				ok: function(){
    					var $dlg = this, $node = $(this.node);
    					require('validate');
    					if(!$('form',$node).valid())return false;
    					
    					var _ares = '', _words = '', _materials = [], _validmaterials = [];
                		$.each(areaArr.submitNode, function(i,n){
                			_ares = n.areacode;
    					});
                		$.each(wordArr.submitNode, function(i,n){
                			var namepath = [n.name];
                			$.each(wordArr.data, function(j,m){
                				if(m.id==n.pId){
                					namepath.push(m.name);
                					$.each(wordArr.data, function(k,o){
                        				if(o.id==m.pId){
                        					namepath.push(o.name);
                        				}
                        			});
                				}
                			});
                			//_words.push({id:n.id, name:namepath.reverse().join('&')});
                			_words = namepath.reverse().join(':');
    					});
                		$('.info_base .info_material',$node).each(function(){
                			var _$m = $(this), 
	                			_id = $('[name=material_id]',_$m).val()
	                			_max = $('[name=material_max]',_$m).val();
                			
                			_materials.push({id:_id, max:_max});
                		});
                		$('.info_base .info_validmaterial',$node).each(function(){
                			var _$m = $(this);
                			
                			_validmaterials.push($('[name=material_id]',_$m).val());
                		});
                		
    					var data = {
    							position_id: $('.info_base [name=position_id]',$node).val(),				//广告位ID
    							media_type: $('.info_base [name=media_type]',$node).val(),					//媒体类型
    							position_max: $('.info_base [name=position_max]',$node).val(),				//分栏数
    							areas: _ares,						//地域
    							words: _words,						//关键字
    							material: _materials,	//物料频次
    							validmaterials: _validmaterials,	//有效物料
    							org: {
    								dailyCostIn: $('.info_org [name=dailyCostIn]',$node).val(),			//站内日花费
    								dailyCostOut: $('.info_org [name=dailyCostOut]',$node).val(),			//站外日花费
    								dailyCostAlly: $('.info_org [name=dailyCostAlly]',$node).val(),			//联盟日花费
    								totalCostIn: $('.info_org [name=totalCostIn]',$node).val(),			//站内总花费
    								totalCostOut: $('.info_org [name=totalCostOut]',$node).val(),			//站外总花费
    								totalCostAlly: $('.info_org [name=totalCostAlly]',$node).val()			//联盟总花费
    							},
    							resource: {
    								dailyPv: $('.info_org [name=dailyPv]',$node).val(),				//分片日曝光
    								dailyClick: $('.info_org [name=dailyClick]',$node).val(),				//分片日点击
    								totalPv: $('.info_org [name=totalPv]',$node).val(),				//分片总曝光
    								totalClick: $('.info_org [name=totalClick]',$node).val()				//分片总点击
    							},
    							strategy: {
    								dailyBudgetIn: $('.info_strategy [name=dailyBudgetIn]',$node).val(),			//站内日预算
    								dailyBudgetOut: $('.info_strategy [name=dailyBudgetOut]',$node).val(),			//站外日预算
    								dailyBudgetAlly: $('.info_strategy [name=dailyBudgetAlly]',$node).val(),			//联盟日预算
    								totalBudgetIn: $('.info_strategy [name=totalBudgetIn]',$node).val(),			//站内总预算
    								totalBudgetOut: $('.info_strategy [name=totalBudgetOut]',$node).val(),			//站内总预算
    								totalBudgetAlly: $('.info_strategy [name=totalBudgetAlly]',$node).val(),			//站内总预算
    								dailyCostIn: $('.info_strategy [name=dailyCostIn]',$node).val(),			//站内日花费
    								dailyCostOut: $('.info_strategy [name=dailyCostOut]',$node).val(),			//站外日花费
    								dailyCostAlly: $('.info_strategy [name=dailyCostAlly]',$node).val(),			//联盟日花费
    								totalCostIn: $('.info_strategy [name=totalCostIn]',$node).val(),			//站内总花费
    								totalCostOut: $('.info_strategy [name=totalCostOut]',$node).val(),			//站内总花费
    								totalCostAlly: $('.info_strategy [name=totalCostAlly]',$node).val(),			//站内总花费
    								dailyPv: $('.info_strategy [name=dailyPv]',$node).val(),				//日曝光
    								dailyClick: $('.info_strategy [name=dailyClick]',$node).val(),				//日点击
    								dailyPvIn: $('.info_strategy [name=dailyPvIn]',$node).val(),				//站内日曝光
    								dailyPvOut: $('.info_strategy [name=dailyPvOut]',$node).val(),				//站外日曝光
    								dailyPvAlly: $('.info_strategy [name=dailyPvAlly]',$node).val(),			//联盟日曝光
    								totalPv: $('.info_strategy [name=totalPv]',$node).val(),				//总曝光
    								totalClick: $('.info_strategy [name=totalClick]',$node).val(),				//总曝光
    								totalPvIn: $('.info_strategy [name=totalPvIn]',$node).val(),				//站内总曝光
    								totalPvOut: $('.info_strategy [name=totalPvOut]',$node).val(),				//站外总曝光
    								totalPvAlly: $('.info_strategy [name=totalPvAlly]',$node).val()				//联盟总曝光
    							},				
    							xml: $formate.getjson($('.uicontent',$node)),
    							code: op.java
    						}
    					
    					var tmpl = ['<table style="min-width:300px;max-width:500px;">',
		        						'<tr><td rowspan="4" style="width:100px" class="txtl txtc"><span class="alert-{state}"></span></td><td style="width:80px">状　　态：</td><td>{message}</td></tr>',
		        						'<tr><td style="padding:10px 0;">出　　价：</td><td>{price}</td></tr>',
		        						'<tr class="error"><td style="vertical-align:top;">错误信息：</td><td>{detail}</td></tr>',
		        						'<tr><td style="vertical-align:top;">日志信息：</td><td>{log}</td></tr>',
	        						'</table>'].join('');
    					$ajax.ajax({
    	        			url: requestUrl.submit,
    	        			data: JSON.stringify(data),
    	            		contentType : "application/json",
    	                    type : 'POST',
    	                    dataType : 'json',
    	        			success: function(data){
    	        				if(semi.utils.isEmpty(data.log)) data.log = '<span class="gray">—</span>';
    	        				tmpl = tmpl.replace('{state}', 'success').replace('{message}', '算法检验通过！').replace('{price}', data.message+'元/CPM').replace('{log}', data.log);
    	    					$dialog({
    	    			        	title: '测试结果',
    	    			            id: 'Alert',
                    				zIndex: semi.utils.topIndex(),
    	    			            fixed: true,
    	    			            padding: '15px 30px',
    	    			            content: $(tmpl).find('.error').remove().end()[0].outerHTML,
    	    			            okValue: '结束测试',
    	    			            ok: function(){
    	    			            	$dlg.close().remove();
    	    			            },
    	    			            cancelValue: '继续测试',
    	    			            cancel: true,
    	    			            onbeforeremove: function(){
    	    			            	if(!semi.utils.isEmpty(op.success) && $.isFunction(op.success))op.success.call(this, data);
    	    			            }
    	    			        }).showModal();
    	        			},
    	        			error: function(data){
    	        				if(semi.utils.isEmpty(data.log)) data.log = '<span class="gray">—</span>';
    	        				tmpl = tmpl.replace('{state}', 'error').replace('{message}', '算法检验失败	！').replace('{price}', '<span class="gray">—</span>').replace('{log}', data.log).replace('{detail}', data.message);
    	        				$dialog({
    	    			        	title: '测试结果',
    	    			            id: 'Alert',
                    				zIndex: semi.utils.topIndex(),
    	    			            fixed: true,
    	    			            padding: '15px 30px',
    	    			            content: tmpl,
    	    			            okValue: '结束测试',
    	    			            ok: function(){
    	    			            	$dlg.close().remove();
    	    			            },
    	    			            cancelValue: '继续测试',
    	    			            cancel: true,
    	    			            onbeforeremove: function(){
    	    			            	if(!semi.utils.isEmpty(op.error) && $.isFunction(op.error))op.error.call(this, data);
    	    			            }
    	    			        }).showModal();
    	        			}
    	        		});
    	            	return false;
    				},
    				cancelValue: '取消',
    				cancel: true
    			}).showModal();
    		}
    	});
	}
	
	$(document).on('mouseover.material', '.material_plus,.material_minus', function(){
		$(this).parent().css('border-color','#ccc');
	}).on('mouseout.material', '.material_plus,.material_minus', function(){
		$(this).parent().css('border-color','#f6f6f6');
	}).on('click.material', '.material_plus', function(){
		var $rpt = $(this).parent(), 
			_rpt = $rpt.clone().css('border-color','#f6f6f6').append('<span class="glyphicon glyphicon-minus material_minus" title="删除"></span>').find('input').val('').end();
		
		$('.material_plus',_rpt).remove();
		if($rpt.siblings().size()>0){
			$rpt.siblings().last().after(_rpt);
		}else{
			$rpt.after(_rpt);
		}
	}).on('click.material', '.material_minus', function(){
		$(this).parent().remove();
	});
	
	return{
		valid: validAlgorithm
	}
	var a = {
		position_id: '',				//广告位ID
		media_type: '',					//媒体类型
		position_max: '',				//分栏数
		areas: '',						//地域
		words: '',						//关键字
		material: [{id:'', max:''}],	//物料频次
		validmaterial: [],				//有效物料
		org: {
			dailyCostIn: '',			//站内日花费
			dailyCostOut: '',			//站外日花费
			dailyCostAlly: '',			//联盟日花费
			totalCostIn: '',			//站内总花费
			totalCostOut: '',			//站外总花费
			totalCostAlly: ''			//联盟总花费
		},
		resource: {
			dailyPv: '',				//分片日曝光
			dailyClick: '',				//分片日点击
			totalPv: '',				//分片总曝光
			totalClick: ''				//分片总点击
		},
		strategy: {
			dailyBudgetIn: '',			//站内日预算
			dailyBudgetOut: '',			//站外日预算
			dailyBudgetAlly: '',		//联盟日预算
			totalBudgetIn: '',			//站内总预算
			totalBudgetOut: '',			//站内总预算
			totalBudgetAlly: '',		//站内总预算
			dailyCostIn: '',			//站内日花费
			dailyCostOut: '',			//站外日花费
			dailyCostAlly: '',			//联盟日花费
			totalCostIn: '',			//站内总花费
			totalCostOut: '',			//站内总花费
			totalCostAlly: '',			//站内总花费
			dailyPv: '',				//日曝光
			dailyClick: '',				//日点击
			dailyPvIn: '',				//站内日曝光
			dailyPvOut: '',				//站外日曝光
			dailyPvAlly: '',			//联盟日曝光
			totalPv: '',				//总曝光
			totalClick: '',				//总曝光
			totalPvIn: '',				//站内总曝光
			totalPvOut: '',				//站外总曝光
			totalPvAlly: ''				//联盟总曝光
		},				
		xml: {
			//算法ui自定义参数json
		}
	}
});